package ru.app;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import ru.app.entity.Account;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class AccountTest {
    private Account account;

    @BeforeEach
    public void before() {
        account = new Account(20);
    }

    @Test
    public void firstAccountTest() {
        System.out.println("[AccountTest.java] Запущен тест: firstAccountTest");
        assertTrue(account.withdraw(5));
        System.out.println("[AccountTest.java] Остановлен тест: firstAccountTest");
    }

    @Test
    public void secondAccountTest() {
        System.out.println("[AccountTest.java] Запущен тест: secondAccountTest");
        assertFalse(account.withdraw(100));
        System.out.println("[AccountTest.java] Остановлен тест: secondAccountTest");
    }
}
